package com.qianyu.project.mapper.provider.gsl;

import com.qianyu.project.entity.OpenCompany;
import org.apache.ibatis.jdbc.SQL;

/**
 * @description 描述一下方法的作用
 * @date: $ $
 * @author: $
 * @return $
 */
public class OpenCompanyMapperProvider {
    public String selecti(OpenCompany i){
        String sql=new SQL(){
            {
              SELECT("*");
              FROM("open_company");
              if(i.getOpenCompanyName()!=null && i.getOpenCompanyName()!=""){
                  WHERE("open_company_name=#{openCompanyName}");
              }
            }
        }.toString();
        return sql;
    }
    public String selectByid(String i){
        String sql=new SQL(){
            {
                SELECT("*");
                FROM("open_company");
                WHERE("id="+i);
            }
        }.toString();
        return sql;
    }public String inserti(OpenCompany i){
        String sql=new SQL(){
            {
                INSERT_INTO("open_company");
            VALUES("id,open_company_name","null,#{openCompanyName}");
            }
        }.toString();
        return sql;
    }public String deletei(String i){
        String sql=new SQL(){
            {
                DELETE_FROM("open_company");
                WHERE("id="+i);
            }
        }.toString();
        return sql;
    }public String updatei(OpenCompany i){
        String sql=new SQL(){
            {
                UPDATE("open_company");
                SET("open_company_name =#{openCompanyName}");
            WHERE("id=#{id}");
            }
        }.toString();
        return sql;
    }

}
